<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>登录</title>
    <link th:href="@{/css/tailwindcss.css}" rel="stylesheet">
</head>
<body class="bg-gray-100">
    <div class="min-h-screen flex items-center justify-center">
        <div class="bg-white p-8 rounded-lg shadow-md w-96">
            <h2 class="text-2xl font-bold mb-6 text-center">用户登录</h2>
            
            <form th:action="@{/login}" method="post" class="space-y-4">
                <div>
                    <label class="block text-sm font-medium text-gray-700">用户名</label>
                    <input type="text" name="username" 
                           class="mt-1 block w-full rounded-md border-gray-300 shadow-sm">
                </div>
                
                <div>
                    <label class="block text-sm font-medium text-gray-700">密码</label>
                    <input type="password" name="password" 
                           class="mt-1 block w-full rounded-md border-gray-300 shadow-sm">
                </div>
                
                <div>
                    <label class="block text-sm font-medium text-gray-700">验证码</label>
                    <div class="flex space-x-2">
                        <input type="text" name="captcha" 
                               class="mt-1 block w-2/3 rounded-md border-gray-300 shadow-sm">
                        <img th:src="@{/captcha}" class="mt-1 w-1/3 h-10" 
                             onclick="this.src='/captcha?'+Math.random()">
                    </div>
                </div>
                
                <button type="submit" 
                        class="w-full bg-blue-500 text-white rounded-md py-2 hover:bg-blue-600">
                    登录
                </button>
            </form>
        </div>
    </div>
</body>
</html> 